**************************************************************************************************************************************
*****                                                                                                                            *****
***** Does personal experience lead to better investment outcomes? Evidence from EDGAR search activities in Las Vegas            *****
*****                                                                                                                            *****              
*****                                                        AUG 2023                                                            *****
*****                                                                                                                            *****
*****                                                                                                                            *****
**************************************************************************************************************************************

***********************
****    CONTENTS   ****
***********************
*1) Main Regression Analysis - Tables 3 through 5

***********************************************
*Variable Descriptions included in ReadMe file*
***********************************************

/*Main Results*/

/*Table 3*/
use "file path for Vegas_Data_FM dataset", clear
rename *, lower
set more off
local ind vegas_new_ind 
local var earn0 ra1 lmcap lmb roa_w lev_w ret12_w std12_w lag_idiovol_w io_w   
reg vegas_new_ind newvegas log_f6 `var' i.year i.ffi48, cluster(permno) r
estimates store m1, title(Model 1)
reg vegas_new_ind newvegas log_allfilings `var' i.year i.ffi48, cluster(permno) r
estimates store m2, title(Model 2)
reg vegas_new_ind newvegas gs `var' i.year i.ffi48, cluster(permno) r
estimates store m3, title(Model 3)
reg vegas_new_ind newvegas log_f6 log_allfilings gs `var' i.year i.ffi48, cluster(permno) r
estimates store m4, title(Model 4)
reg vegas_new_ind vegas_ba_new log_f6 `var' i.year i.ffi48, cluster(permno) r
estimates store m5, title(Model 5)
reg vegas_new_ind vegas_ba_new log_allfilings `var' i.year i.ffi48, cluster(permno) r
estimates store m6, title(Model 6)
reg vegas_new_ind vegas_ba_new gs `var' i.year i.ffi48, cluster(permno) r
estimates store m7, title(Model 7)
reg vegas_new_ind vegas_ba_new log_f6 log_allfilings gs `var' i.year i.ffi48, cluster(permno) r
estimates store m8, title(Model 8)
esttab m1 m2 m3 m4 m5 m6 m7 m8 using "file path for Vegas_Data_FM dataset", replace nogaps compress cells(b(star fmt(3)) t(par fmt(2))) ar2(3) pr2(3) starlevels( * 0.10 ** 0.05 *** 0.010)

/*Table 4*/
use "file path for Vegas_Data_FM dataset", clear
rename *, lower
set more off
local ind vegas_new_ind
local var log_f6 gs earn0 ra1 lmcap lmb roa_w lev_w ret12_w std12_w lag_idiovol_w io_w
reg bhar1m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m1, title(Model 1)
reg bhar3m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m2, title(Model 2)
reg bhar6m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m3, title(Model 3)
reg bhar12m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m4, title(Model 4)
esttab m1 m2 m3 m4 using "file path for Vegas_Data_FM dataset", replace nogaps compress cells(b(star fmt(3)) t(par fmt(2))) ar2(3) pr2(3) starlevels( * 0.10 ** 0.05 *** 0.010)

/*Table 5*/
use "file path for Vegas_Data_FM dataset", clear
rename *, lower
set more off
local ind vegas_new_ind newvegas newvegas_interaction
local var log_f6 gs earn0 ra1 lmcap lmb roa_w lev_w ret12_w std12_w lag_idiovol_w io_w 
reg bhar1m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m1, title(Model 1)
reg bhar3m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m2, title(Model 2)
reg bhar6m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m3, title(Model 3)
reg bhar12m `ind' `var' i.year i.ffi48, cluster(permno) r
estimates store m4, title(Model 4)
esttab m1 m2 m3 m4 using "file path for Vegas_Data_FM dataset", replace nogaps compress cells(b(star fmt(3)) t(par fmt(2))) ar2(3) pr2(3) starlevels( * 0.10 ** 0.05 *** 0.010)

